fix(chat): hide message actions on content-less messages (compact subagent cards)#721
Open
blove wants to merge 1 commit into
Open
fix(chat): hide message actions on content-less messages (compact subagent cards)#721blove wants to merge 1 commit into
blove wants to merge 1 commit into
Conversation
…agent cards) A subagent delegation renders as its own assistant message whose only content is the subagent card (no assistant text). It was still getting the full message- actions toolbar (regenerate/copy/thumbs up/down) — pure whitespace, since there is nothing to copy/regenerate/rate — which bloated the stream. Gate <chat-message-actions> on the message having copyable text (`content.trim()`). Subagent cards and bare tool-call messages now render compact; real answers keep their actions. Verified live in examples/ag-ui (research subagent): the delegation card's actions toolbar is gone; the answer message retains exactly one actions toolbar. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Claude finished @blove's task in 1m 4s —— View job Code Review
LGTM. The fix is clean, minimal, and correct. What was checked:
The verbose block comment added is consistent with the existing comment style in this template (there are several others explaining subtle behaviour). No issues with that. No test coverage gap: the PR correctly notes that the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A subagent delegation renders as its own assistant message whose only content is the subagent card (no assistant text). That message was still getting the full message-actions toolbar — regenerate / copy / 👍 / 👎 — which is pure whitespace there (nothing to copy, regenerate, or rate) and bloats the message stream.
Fix
Gate
<chat-message-actions>on the message having copyable text (@if (content.trim())). Content-less messages — subagent cards and bare tool-call messages — now render compact; real answers keep their actions.Verification (live, examples/ag-ui research subagent)
Drove the running app and inspected the DOM before/after:
researchsubagent card (the delegation message) + one after the answer.One-line template gate;
@threadplane/chatbuilds green. (The existingchat.component.specintentionally avoids full-DOM fixtures due to the required[agent]input, so this was verified via live smoke rather than a brittle DOM unit test.)🤖 Generated with Claude Code